﻿@model Promike.site.Models.Photo
@{
    ViewBag.Title = Model.FileName;
}
@{
    if (@Model != null)
    {
        var src = "/Files/" + Model.PhysicalName;
        <div class="div-image">
            <img class="full-image" src="@src" alt="@Model.FileName" onclick=" window.location = '/Photo/FullImage/@Model.Id' "/>
            <div style="margin-top: 10px;">
                <div class="back-button-td" onclick=" window.location = '/Photo/PrevImage/@Model.Id' "><span>&lt;--</span></div>
                <div class="back-button-td" onclick=" window.location = '/Photo/NextImage/@Model.Id' "><span>--&gt;</span></div>
            </div>
        </div>
        <div class="photo-info">
            <div id="exif" class="exif">
                <h3>Информация о фото:</h3>
                <label class="label-info"><span class="info-text">Автор:&nbsp;</span>@Model.Author</label>
                <label class="label-info"><span class="info-text">Дата публикации:&nbsp;</span>@Model.DatePublish.ToShortDateString()</label>
                <label class="label-info"><span class="info-text">Модель аппарата:&nbsp;</span>@Model.Make-@Model.Manufacter</label>
                <label class="label-info"><span class="info-text">Выдержка:&nbsp;</span>@Model.ExposureTime&nbsp;сек</label>
                <label class="label-info"><span class="info-text">Диафрагма:&nbsp;</span>@Model.Aperture</label>
                <label class="label-info"><span class="info-text">Баланс белого:&nbsp;</span>@Model.Balance</label>
                <label class="label-info"><span class="info-text">Вспышка:&nbsp;</span>@Model.Flash</label>
                <label class="label-info"><span class="info-text">Фокусное расстояние:&nbsp;</span>@Model.Focal&nbsp;мм</label>
                <label class="label-info"><span class="info-text">Ориентация:&nbsp;</span>@Model.Orientation</label>
                <label class="label-info"><span class="info-text">Исо:&nbsp;</span>@Model.Iso</label>
                <label class="label-info"><span class="info-text">Режим фото:&nbsp;</span>@Model.Mode</label>
            </div>
            <p>
                <div id="vk_like"></div>
                <script type="text/javascript">
                    VK.Widgets.Like("vk_like", { type: "full", height: 24 });
                </script>
            </p>
            <p class="download">@Html.ActionLink("Скачать фото", "DownloadFile", new {fileName = Model.PhysicalName}, new {@class = "download-file", title = "Скачать фото"})</p>
            <div id="cycle">
                @foreach (var item in ViewBag.AllPhotos)
                {
                    var src2 = "/Files/" + @item.PhysicalName;
                    <img class="crop-micro-image" src="@src2" alt="@item.FileName" title="Рейтинг: @item.Clicks" onclick=" window.location = '/Photo/Image/@item.Id' "/>
                }
            </div>
        </div>
        <br />
        <!-- Put this div tag to the place, where the Comments block will be -->
        <div id="vk_comments"></div>
    }
}
@Scripts.Render("~/bundles/social-buttons")
@Scripts.Render("~/bundles/cycle")
<script type="text/javascript">
    VK.Widgets.Comments("vk_comments", { limit: 10, width: "500", attach: "*" });
</script>
<script type="text/javascript">
    $('#cycle').cycle({
        speed: 1000,
        timeout: 2000
    });
</script>
